package com.fy.oa.zc.rest;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 返回表单字段的值
 * 
 * @author Administrator
 *
 */
public class FyOARestValuesBean {
	private Map<String, String> values ;
	private Map<String, List<String>> repeatValues;

	/**
	 * 获取主表字段的值
	 * 
	 * @return
	 */
	public Map<String, String> getValues() {
		return values;
	}

	public void setValues(String name, String value) {
		if (this.values == null) {
			this.values = new HashMap<String, String>();
		}
		this.values.put(name, value);
	}

	/**
	 * 获取重复表字段的值
	 * 
	 * @return
	 */
	public Map<String, List<String>> getRepeatValues() {
		return repeatValues;
	}

	public void setRepeatValues(String name, String value) {
		if (this.repeatValues == null) {
			this.repeatValues = new HashMap<String, List<String>>();
		}
		List<String> values = null;
		if ((values=this.repeatValues.get(name)) == null) {
			values = new ArrayList<String>();
			this.repeatValues.put(name, values);
		}
		values.add(value);
	}
}
